package com.xjl.aop.springbootaop.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.xjl.aop.springbootaop.annotation.PermissionAnnotation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/permission")
public class TestController {
    @RequestMapping(value = "/check", method = RequestMethod.POST)
    // 添加这个注解
    @PermissionAnnotation("测试模块")
    public JSONObject getGroupList(@RequestBody JSONObject request) {
        System.out.println("===================执行方法体===================：" + System.currentTimeMillis());
        return JSON.parseObject("{\"message\":\"SUCCESS\",\"code\":200}");
    }
}

